from src.routers.ESRISlpk.esri_slpk_tile import ESRISlpkJson, ESRISlpkNodepages, ESRISlpkGeometries, \
    ESRISlpkTextures, ESRISlpkRootJson, ESRISlpkNodeJSON, ESRISlpkNodeSharedJSON, ESRISlpk_path, ESRISlpkSublayersJSON, \
    ESRISlpk



def BuildESRISlpkRoute(api):
    api.add_resource(ESRISlpkJson, '/<string:servicename>/SceneServer')
    api.add_resource(ESRISlpkRootJson, '/<string:servicename>/SceneServer/nodes/root','/<string:servicename>/SceneServer/layers/0/nodes/root')
    api.add_resource(ESRISlpkNodeJSON, '/<string:servicename>/SceneServer/nodes/<string:tilenum>','/<string:servicename>/SceneServer/layers/0/nodes/<string:tilenum>')
    api.add_resource(ESRISlpkSublayersJSON, '/<string:servicename>/SceneServer/sublayers/<string:tilenum>','/<string:servicename>/SceneServer/layers/0/sublayers/<string:tilenum>')
    api.add_resource(ESRISlpkNodeSharedJSON, '/<string:servicename>/SceneServer/nodes/<string:tilenum>/shared','/<string:servicename>/SceneServer/layers/0/nodes/<string:tilenum>/shared')
    api.add_resource(ESRISlpkNodepages, '/<string:servicename>/SceneServer/nodepages/<string:filename>',
                     '/<string:servicename>/SceneServer/layers/0/nodepages/<string:filename>')
    api.add_resource(ESRISlpkGeometries,
                     '/<string:servicename>/SceneServer/nodes/<string:tilenum>/geometries/<string:filename>',
                     '/<string:servicename>/SceneServer/layers/0/nodes/<string:tilenum>/geometries/<string:filename>')
    api.add_resource(ESRISlpkTextures,
                     '/<string:servicename>/SceneServer/nodes/<string:tilenum>/textures/<string:filename>',
                     '/<string:servicename>/SceneServer/layers/0/nodes/<string:tilenum>/textures/<string:filename>')
    api.add_resource(ESRISlpk_path,
                     '/<string:servicename>/SceneServer/<path:full_path>')
    api.add_resource(ESRISlpk, '/<string:servicename>/SceneServer/<path:full_path>')